package com.t26.web.vo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 *  统一返回结果集
 * @author Administrator
 *
 * @param <T>
 */
public class ResultData<T> {
	/**
	 * 结果状态
	 */
	private String code;
	/**
	 * 结果数据信息
	 */
	private T data;
	/**
	 * 结果提示信息
	 */
	private String msg;
	/**
	 * 分页数据
	 */
	private Page<?> page;
	
	public ResultData() {
		super();
	}

	public ResultData(String code, T data, String msg,Page<T> page) {
		super();
		this.code = code;
		this.data = data;
		this.msg = msg;
		this.page=page;
	}
	
	public ResultData(String code, T data, String msg) {
		super();
		this.code = code;
		this.data = data;
		this.msg = msg;
	}
	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	public Page<?> getPage() {
		return page;
	}

	public void setPage(Page<?> page) {
		this.page = page;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setcode(String code) {
		this.code = code;
	}

	/**
	 * @return the data
	 */
	public T getData() {
		return data;
	}

	/**
	 * @param data
	 *            the data to set
	 */
	public void setData(T data) {
		this.data = data;
	}

	/**
	 * @return the msg
	 */
	public String getMsg() {
		return msg;
	}

	/**
	 * @param msg
	 *            the msg to set
	 */
	public void setMsg(String msg) {
		this.msg = msg;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "{" + "\"" + "code" + "\"" + ":" + code + ", " + "\"" + "data" + "\"" + ":" + data + "," + "\""
				+ "msg" + "\"" + ":" + "\"" + msg + "\"" + "}";
	}
}
